Hop til hovedindhold

Container Apps Log Stream

Document status35 - Reviewed

The Azure Container Apps Log Stream provides real-time access to container logs directly from the Azure Portal. This is invaluable for debugging issues, monitoring application behavior, and viewing logs as they are written.


Accessing Log Stream

Via Azure Portal

  1. Navigate to Azure Portal
  2. In the search field, type the container app name (e.g., ec-<environment>-<customer>-ecc-ca)
  3. Click on the container app
  4. In the left menu, expand Monitoring
  5. Click Log stream

Selecting the Container

The Log Stream view allows you to select which container to monitor:

ContainerDescription
app containerYour application container (e.g., ecc, dmc, nts, client) - shows application logs
daprdThe Dapr sidecar container - shows Dapr runtime logs, service invocations, and mTLS handshakes

To switch containers:

  1. Use the Container dropdown at the top of the Log Stream view
  2. Select the desired container

Common Use Cases

Debugging Application Issues

Select the app container to view:

  • Application startup logs
  • HTTP request/response logs
  • Exception stack traces
  • Custom log messages from the code

Debugging Dapr Issues

Select the daprd container to view:

  • Dapr sidecar initialization
  • Service-to-service invocation logs
  • Component loading (pub/sub, state stores)

Tips for Effective Log Streaming

TipDescription
Use log levelsSet logLevel: debug in Dapr configuration for verbose output during troubleshooting
Filter by replicaIf running multiple replicas, select a specific replica to focus on
TimestampsLogs include timestamps - useful for correlating events across services
ReconnectionThe stream may disconnect after inactivity; refresh the page to reconnect

Alternative: Azure CLI

You can also stream logs using the Azure CLI:

# Stream application container logs
az containerapp logs show \
--name ec-<environment>-<customer>-ecc-ca \
--resource-group ec-<environment>-<customer>-apps-rg \
--type console \
--follow

# Stream system (Dapr sidecar) logs
az containerapp logs show \
--name ec-<environment>-<customer>-ecc-ca \
--resource-group ec-<environment>-<customer>-apps-rg \
--type system \
--follow
ParameterDescription
--type consoleApplication container logs
--type systemDapr sidecar and system logs
--followContinuously stream new logs